
import { useSearchParams } from "react-router-dom"
import { DetailRes, fetchDetailAPI } from "../apis/detail"
import { useEffect, useState } from "react"
function Detail() {
  const [detail, setDetail] = useState<DetailRes|null>(null)
 const [param]=useSearchParams();
 const id=param.get('id')
  useEffect(() => {
    const getDetail = async () => {
      const res = await fetchDetailAPI(id!)
      setDetail(res.data.data)
    }
    getDetail();
  },[id])
  return (
    <>
      <div>Detail</div>
    </>
  )
}

export default Detail
